import { lazy } from 'react'
import {
  HomeOutlined,
  PictureOutlined,
  MenuOutlined
} from '@ant-design/icons';
const routes = [

  {
    key: '0-0',
    path: '/',
    title: '系统首页',
    icon: <HomeOutlined />,
    component: lazy(() => import('./../views/home/Index.jsx'))
  },
  {
    key: '0-1',
    path: '/banner',
    title: '轮播图管理',
    icon: <PictureOutlined />,
    redirect: '/banner/list',
    children: [
      {
        key: '0-1-0',
        path: '/banner/list',
        title: '轮播图列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/banner/Index.jsx'))
      },
      {
        key: '0-1-1',
        path: '/banner/add',
        title: '添加轮播图',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/banner/Add.jsx')),
        hidden: true
      }
    ]
  },
  {
    key: '0-2',
    path: '/pro',
    title: '产品管理',
    icon: <PictureOutlined />,
    redirect: '/pro/list',
    children: [
      {
        key: '0-2-0',
        path: '/pro/list',
        title: '产品列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Index.jsx'))
      },
      {
        key: '0-2-1',
        path: '/pro/seckill',
        title: '秒杀列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Seckill.jsx'))
      },
      {
        key: '0-2-2',
        path: '/pro/recommend',
        title: '推荐列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Recommend.jsx'))
      },
      {
        key: '0-2-3',
        path: '/pro/search',
        title: '筛选列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Search.jsx'))
      }
    ]
  },
  {
    key: '0-3',
    path: '/user',
    title: '账户管理',
    icon: <PictureOutlined />,
    redirect: '/user/list',
    children: [
      {
        key: '0-3-0',
        path: '/user/list',
        title: '用户列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/user/Index.jsx'))
      },
      {
        key: '0-3-1',
        path: '/user/admin',
        title: '管理员列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/user/Admin.jsx'))
      }
    ]
  },
  {
    key: '0-4',
    path: '/setting',
    title: '设置',
    icon: <HomeOutlined />,
    component: lazy(() => import('./../views/setting/Index.jsx')),
    hidden: true
  },
  {
    key: '0-5',
    path: '/data',
    title: '数据可视化',
    icon: <PictureOutlined />,
    redirect: '/data/echarts',
    children: [
      {
        key: '0-5-0',
        path: '/data/echarts',
        title: 'echarts使用示例',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/data/Echarts.jsx'))
      },
      {
        key: '0-5-1',
        path: '/data/g2',
        title: 'antv-g2使用示例',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/data/G2.jsx'))
      },
      {
        key: '0-5-2',
        path: '/data/antd',
        title: 'antdcharts',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/data/AntdCharts.jsx'))
      }
    ]
  },
  {
    key: '0-6',
    path: '/form',
    title: '编辑器',
    icon: <PictureOutlined />,
    redirect: '/form/editor',
    children: [
      {
        key: '0-6-0',
        path: '/form/editor',
        title: '富文本编辑器',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/form/Editor.jsx'))
      },
      {
        key: '0-6-1',
        path: '/form/md',
        title: 'markdown 编辑器',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/form/Md.jsx'))
      }
    ]
  },
  {
    key: '0-7',
    path: '/excel',
    title: '导入以及导出',
    icon: <PictureOutlined />,
    redirect: '/excel/import',
    children: [
      {
        key: '0-7-0',
        path: '/excel/import',
        title: '导入excel',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/excel/Import.jsx'))
      },
      {
        key: '0-7-1',
        path: '/excel/export',
        title: '导出excel',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/excel/Export.jsx'))
      }
    ]
  },
  {
    key: '0-8',
    path: '/map',
    title: '地图使用',
    icon: <PictureOutlined />,
    redirect: '/map/bmap',
    children: [
      {
        key: '0-8-0',
        path: '/map/bmap',
        title: '百度地图',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/map/BMap.jsx'))
      },
      {
        key: '0-8-1',
        path: '/map/amap',
        title: '高德地图',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/map/AMap.jsx'))
      },
      {
        key: '0-8-2',
        path: '/map/tmap',
        title: '腾讯地图',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/map/TMap.jsx'))
      }
    ]
  },
  {
    key: '0-9',
    path: '/chat',
    title: '客服',
    icon: <HomeOutlined />,
    component: lazy(() => import('./../views/chat/Index.jsx'))
  }
]

export default routes